/*
 * Exploder
 * 
 * Tero Pyylampi (218437), Jussi Tuurinkoski (211594)
 *
 * An abstract class for the main user interface used in both editor and game mode
 */

#ifndef GAMEINTERFACEITEMANDOBJECTCONTAINER_H
#define GAMEINTERFACEITEMANDOBJECTCONTAINER_H

#include "GameInterfaceObject.h"
#include "../../Common.h"
#include "Box2D/Box2D.h"

#include <string>

class MainEngine;
class GameCamera;
class GameInterfacePhysicObjectButton;

class GameInterfaceItemAndObjectContainer : public GameInterfaceObject {
public:
	// default constructor
	GameInterfaceItemAndObjectContainer( cocos2d::CCLayer *layer, MainEngine *mainEngine );
	// default destructor
	virtual ~GameInterfaceItemAndObjectContainer();

	// update function of the object
	virtual void update( cocos2d::ccTime dt ) = 0;

	// common callback functions

	// exit the game or the editor
	void exitCallback( cocos2d::CCObject *pSender );
	// help button
	virtual void helpCallback( cocos2d::CCObject *pSender ) = 0;

	// get the object buttons used
	std::vector< GameInterfacePhysicObjectButton* > &getObjectButtons();
	// create and return the physics body of the wanted element
	virtual b2Body *createNewItem( GameCamera *camera, PhysicObjectItems type, b2Vec2 pos ) = 0;

protected:
	// pointer to the main engine
	MainEngine *mMainEngine;

	// buttons included
	std::vector< GameInterfacePhysicObjectButton* > mObjectButtons;

	// background sprite
	cocos2d::CCSprite *mBackgroundSprite;
	// menu used
	cocos2d::CCMenu *mMenu;
};

#endif